/*
 * @Author: fhw
 * @Date: 2022-04-21 22:43:47
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-01-30 22:29:47
 * @Description: 基础数据仓库
 */
import { getModule, Module, VuexModule } from 'vuex-module-decorators'
import store from '@/store'
import { ChatUnreadMessage, ChatUserGroup, ContactsFriends, Friends } from '@/interface'

export interface Contacts extends ContactsFriends, ChatUserGroup {}
export interface BasicDataState {
	chatUnreadMessage: { [key: number | string]: ChatUnreadMessage }
}
export interface Options {
	value: string | number
	label: string
	type?: number
	title?: string
	[index: string]: any
	children?: Array<this>
	isLeaf?: boolean
	loading?: boolean
}
export interface FriendsVerifyList extends Friends {
	spinning: boolean
}
@Module({ namespaced: true, store, name: 'basicData', dynamic: true })
export class ChatRecord extends VuexModule implements BasicDataState {
	public chatUnreadMessage: { [key: string | number]: ChatUnreadMessage } = {} //聊天未读消息
}

export const ChatRecordModule = getModule(ChatRecord)
